# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kldap
pkgver=20.04.3
pkgrel=0
pkgdesc="LDAP access API for KDE"
arch="all !armhf"
url="https://github.com/kde/kldap"
license="LGPL-2.0-or-later"
depends_dev="kio-dev ki18n-dev kdoctools-dev kcompletion-dev kwidgetsaddons-dev openldap-dev"
makedepends="$depends_dev extra-cmake-modules cyrus-sasl-dev"
source="https://download.kde.org/stable/release-service/$pkgver/src/kldap-$pkgver.tar.xz"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}
sha512sums="6ae46a9ca2bc6d44c4ff4ba17d9681e74d20e50307af2a924b323487f368ade746a8d13060b8d2410b6f67a7a8577df2ef413f3987faad5c73eb49d4ac36d303  kldap-20.04.3.tar.xz"
